"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const redis_1 = require("redis");
const log4js_1 = require("log4js");
const logger = (0, log4js_1.getLogger)('Redis');
const map = {
    ['classId']: {
        classId: '',
        classname: '',
        classType: '',
        chatMode: '',
        ['userId']: {
            userId: '',
            username: '',
            [`selfId::otherId::offer`]: '',
            [`selfId::otherId::answer`]: '',
        }
    }
};
async function default_1(cb = (arg1, arg2) => { }) {
    const redisClient = (0, redis_1.createClient)();
    redisClient.on('error', err => {
        console.log('Redis Client Error', err);
        cb(err);
    });
    redisClient.on('ready', () => logger.info('Redis Client is ready to use'));
    function cache(req, res, next) {
        const { username } = req.params;
    }
    await redisClient.connect();
    cb(null, redisClient);
    return redisClient;
}
exports.default = default_1;
